#pragma once
#include "stdafx.h"
#include "matlib.h"
#include "BlackScholesModel.h"
#include "PathIndependentOption.h"
#include "testing.h"
#include "MonteCarloPricer.h"

class DigitalPutOption : public PathIndependentOption {
public:
    /*  Calculate the payoff of the option given
        a history of prices */
    double payoff(double endStockPrice) const;

    double payoff(
        const std::vector<double>& stockPrices
    ) const;

    double price(const BlackScholesModel& bsm)
        const;

    bool isPathDependent() const {
        return false;
    };
};

void testDigitalPutOption();